USE [QLDL]
GO

/****** Object:  Table [dbo].[MATHANG]    Script Date: 01/03/2011 15:20:21 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[MATHANG](
	[MaMatHang] [nvarchar](10) NOT NULL,
	[TenMatHang] [ntext] NULL,
	[MaDonViTinh] [nvarchar](10) NULL,
	[DonGia] [money] NULL,
 CONSTRAINT [PK_MATHANG] PRIMARY KEY CLUSTERED 
(
	[MaMatHang] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

ALTER TABLE [dbo].[MATHANG]  WITH CHECK ADD  CONSTRAINT [FK_MATHANG_MaDonViTinh] FOREIGN KEY([MaDonViTinh])
REFERENCES [dbo].[DONVITINH] ([MaDonViTinh])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[MATHANG] CHECK CONSTRAINT [FK_MATHANG_MaDonViTinh]
GO


